﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BrokerBase.Lib.Policy;

namespace BrokerBase.Lib.Product
{
    public interface IRateFactorConverter
    {
        /// <summary>
        /// 关联的费率因子
        /// </summary>
        IRateFactor Owner { get; set; }
        /// <summary>
        /// 别名
        /// </summary>
        string[] Alias { get; }
        /// <summary>
        /// 是否匹配
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        bool IsMatch(string name);
        /// <summary>
        /// 是否支持到产品属性的转换
        /// </summary>
        bool IsToPropertiesEnable { get; }
        /// <summary>
        /// 费率因子转换到产品属性
        /// </summary>
        /// <param name="rf"></param>
        /// <param name="callBack"></param>
        void ToProperties();
        /// <summary>
        /// 是否支持费率因子转换到保单属性
        /// </summary>
        bool IsPolicySelectedEnable { get; }
        /// <summary>
        /// 费率因子转换到保单属性
        /// </summary>
        /// <param name="rf"></param>
        /// <param name="item"></param>
        /// <param name="properties"></param>
        /// <param name="callBack"></param>
        void ToPolicySelected(IPolicy policy, string item);

        /// <summary>
        /// 根据保单获取一个设置
        /// 优先去保单的设置，否则取默认值
        /// </summary>
        /// <param name="policy"></param>
        /// <param name="isLock"></param>
        /// <returns></returns>
        string GetItemByPolicy(IPolicy policy);

        /// <summary>
        /// 是否是阶梯保额
        /// </summary>
        bool IsLadder { get; }
        /// <summary>
        /// 是否需要显示
        /// </summary>
        bool IsDisplay { get; }

        bool IsFixedProperty { get; }

    }
}
